<test>
  <sql>SELECT	DISTINCT
		CASE WHEN e.EmployeeID % 2 = 0 THEN 1 ELSE 2 END
FROM	Employees e</sql>
  <expectedResults>
    <NewDataSet>
  <xs:schema id="NewDataSet" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
      <xs:complexType>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element name="Table1">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="Column" msdata:Caption="" type="xs:int" minOccurs="0" />
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:choice>
      </xs:complexType>
    </xs:element>
  </xs:schema>
  <Table1>
    <Column>1</Column>
  </Table1>
  <Table1>
    <Column>2</Column>
  </Table1>
</NewDataSet>
  </expectedResults>
  <expectedPlan>
    <executionPlan>
      <element operator="Select">
        <properties>
          <property name="Output List.[0]" value="Expr1001 AS " />
          <property name="Output List.[0].Column" value="Expr1001" />
          <property name="Output List.[0].DataType" value="Int32" />
        </properties>
        <input>
          <element operator="Sort">
            <properties>
              <property name="Output List.[0]" value="Expr1001" />
              <property name="Output List.[0].Column" value="Expr1001" />
              <property name="Output List.[0].DataType" value="Int32" />
              <property name="Statistics.Open Count" value="1" />
              <property name="Statistics.Row Count" value="2" />
              <property name="Statistics.Average Row Count" value="2" />
              <property name="Logical Operator" value="Distinct Sort" />
              <property name="Order By.[0]" value="Expr1001 ASC" />
              <property name="Order By.[0].Column" value="Expr1001" />
              <property name="Order By.[0].DataType" value="Int32" />
              <property name="Order By.[0].Order" value="ASC" />
            </properties>
            <input>
              <element operator="ComputeScalar">
                <properties>
                  <property name="Output List.[0]" value="Expr1001" />
                  <property name="Output List.[0].Column" value="Expr1001" />
                  <property name="Output List.[0].DataType" value="Int32" />
                  <property name="Statistics.Open Count" value="1" />
                  <property name="Statistics.Row Count" value="9" />
                  <property name="Statistics.Average Row Count" value="9" />
                  <property name="Defined Values.[0]" value="Expr1001 = CASE WHEN e.EmployeeID % 2 = 0 THEN 1 ELSE 2 END" />
                  <property name="Defined Values.[0].Target" value="Expr1001" />
                  <property name="Defined Values.[0].DataType" value="Int32" />
                  <property name="Defined Values.[0].Source" value="CASE WHEN e.EmployeeID % 2 = 0 THEN 1 ELSE 2 END" />
                </properties>
                <input>
                  <element operator="TableScan">
                    <properties>
                      <property name="Table" value="Employees AS e" />
                      <property name="Output List.[0]" value="e.EmployeeID" />
                      <property name="Output List.[0].Table" value="e" />
                      <property name="Output List.[0].Column" value="EmployeeID" />
                      <property name="Output List.[0].DataType" value="Int32" />
                      <property name="Statistics.Open Count" value="1" />
                      <property name="Statistics.Row Count" value="9" />
                      <property name="Statistics.Average Row Count" value="9" />
                    </properties>
                    <input />
                  </element>
                </input>
              </element>
            </input>
          </element>
        </input>
      </element>
    </executionPlan>
  </expectedPlan>
</test>